package com.hdoit.ares.logical.ser.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hdoit.ares.logical.ser.dao.IGoodsServiceDao;
import com.hdoit.ares.logical.ser.mapper.GoodsServiceMapper;
import com.hdoit.ares.logical.ser.model.GoodsService;
import com.hdoit.ares.logical.viewmodel.ser.GoodsServiceSearch;
import com.tennetcn.common.dao.base.impl.SuperDao;
import com.tennetcn.common.message.PagerModel;
/**
 * @author      lvsi
 * @email       
 * @createtime  2017年11月22日 14:23:02
 * @comment
 */
@Component
public class GoodsServiceDaoImpl extends SuperDao<GoodsService> implements IGoodsServiceDao{

	private GoodsServiceMapper goodsServiceMapper;
	
	public GoodsServiceMapper getGoodsServiceMapper() {
		return goodsServiceMapper;
	}

	@Resource
	public void setGoodsServiceMapper(GoodsServiceMapper goodsServiceMapper) {
		this.goodsServiceMapper = goodsServiceMapper;
	}

	//所有店铺中的所有商品----------------------------------------
	@Override
	public int queryGoodsServiceCount(GoodsServiceSearch goodsServiceSearch) {

		return goodsServiceMapper.queryGoodsServiceCount(goodsServiceSearch);
	}

	@Override
	public List<GoodsService> queryGoodsServiceList(
			GoodsServiceSearch goodsServiceSearch, PagerModel pagerModel) {
	
		return goodsServiceMapper.queryGoodsServiceList(goodsServiceSearch, pagerModel);
	}

	@Override
	public GoodsService queryGoodsServiceModel(String key) {
		
		return goodsServiceMapper.queryGoodsServiceModel(key);
	}



	@Override
	public Integer queryMaxGoodsSortCode() {
		
		return goodsServiceMapper.queryMaxGoodsSortCode();
	}

	//店铺主人查看的商品界面-----------------------------------------
	@Override
	public int queryGoodsServiceCountById(
			GoodsServiceSearch goodsServiceSearch, String loginId) {
		
		return goodsServiceMapper.queryGoodsServiceCountById(goodsServiceSearch, loginId);
	}

	@Override
	public List<GoodsService> queryGoodsServiceListById(
			GoodsServiceSearch goodsServiceSearch, PagerModel pagerModel,
			String loginId) {
		
		return goodsServiceMapper.queryGoodsServiceListById(goodsServiceSearch, pagerModel, loginId);
	}

	//店铺员工查看的商品界面-----------------------------------------------------------
	@Override
	public int queryStoreGoodsCountById(GoodsServiceSearch goodsServiceSearch,
			String loginId) {
		
		return goodsServiceMapper.queryStoreGoodsCountById(goodsServiceSearch, loginId);
	}

	@Override
	public List<GoodsService> queryStoreGoodsById(
			GoodsServiceSearch goodsServiceSearch, PagerModel pagerModel,
			String loginId) {
		
		return goodsServiceMapper.queryStoreGoodsById(goodsServiceSearch, pagerModel, loginId);
	}

	//------------------------------------------------------
	
	@Override
	public List<GoodsService> queryFirstGoods(String serviceTypeName,
			String  serviceName,String deleteMark) {
		
		return goodsServiceMapper.queryFirstGoods(serviceTypeName, serviceName,deleteMark);
	}

	@Override
	public GoodsService queryModelById(String id) {
		
		return goodsServiceMapper.queryModelById(id);
	}

	@Override
	public int updateLargePicById(String id) {
		
		return goodsServiceMapper.updateLargePicById(id);
	}

	@Override
	public int updateSmallPicById(String id) {
		
		return goodsServiceMapper.updateSmallPicById(id);
	}

}

